package org.swift.mashup.engine.concurrency;

import org.swift.mashup.engine.concurrency.agenda.RestfulJobSet;

public class RestfulConcurrentContext extends ConcurrentContext {

	private final String mashupName;
	
	public RestfulConcurrentContext(String sessionid, ConcurrentConfiguration configuration, String mashupName) {
		super(sessionid, configuration);
		this.mashupName = mashupName;
	}

	@Override
	protected Runnable createJob(String processid, String workingDirectory, 
			int startIndex, int interval) {
		final String url = this.mashupName + "/runConcurrent"; 
		return new RestfulJobSet(this, url, processid, workingDirectory, 
			startIndex, interval);
	}

}
